package test4;

abstract class Shape{
    public int a;
    public void func(){
        System.out.println("测试普通的方法");
    }
    public abstract void draw();
}
abstract class A extends Shape{
    public abstract void funcA();
}
class B extends A{

    @Override
    public void funcA() {
    }
    @Override
    public void draw() {

    }
}
class Rect extends Shape{
    @Override
    public void draw() {
        System.out.println("♦");
    }
}
public class Test4 {

    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
       // Shape shape=new Shape();
        Shape shape=new Rect();
        drawMap(shape);

    }
}
